#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QCloseEvent>
#include <QListWidget>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private:
    Ui::MainWindow *ui;


    QWidget *spacer;            //规划qToolbar右侧qAction
    QAction *exitAction;        //右侧的退出action
    QAction *fullScreenAction;  //全屏action
    QAction *cargoAction;       //货品action
    QAction *reportAction;      //报表action
    QAction *settingAction;     //设置action
    bool fullScreenState;       //全屏状态
    QTimer *pTimer;  //定时器

    void initStyle();
    void initWidget();
    void initLCDNumber();
    void addToolBarAct();
    void createTimer();
    void showTimeToLCD();
    void addTableTab();
    void addButtonToList(int roomType, QListWidget *listWidget);

protected:
    void closeEvent(QCloseEvent *event);        //捕获窗口关闭事件
    //void resizeEvent(QResizeEvent *event);    //捕获窗口大小变化事件

private slots:
    //自定义槽
    void myslot_exitAction_triggered();
    void myslot_fullScreenAction_triggered();
    void myslot_cargoAction_triggered();
    void myslot_reportAction_triggered();
    void myslot_settingAction_triggered();
    void myslot_tableListWidgetItem_clicked(QListWidgetItem *item);
    void myslot_TimeOut();

    //根据名称规则自动加载的槽
    void on_lockScreenAction_triggered();
    void on_startPushButton_clicked();
    void on_action_44_triggered();
};

#endif // MAINWINDOW_H
